package com.greateamd.timetableasy.server.dao;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;

import org.hibernate.HibernateException;
import org.springframework.security.access.prepost.PreAuthorize;

import com.greateamd.timetableasy.domain.Campus;
import com.greateamd.timetableasy.domain.Event;
import com.greateamd.timetableasy.domain.exceptions.IllegalEntityStateException;


public interface CampusDAO extends IBaseDao<Campus, Integer> {

	@Override @PreAuthorize("hasRole('ROLE_ADMIN')")
	void save(Campus campus) throws IllegalEntityStateException,HibernateException,SQLException;
	
	@Override @PreAuthorize("hasRole('ROLE_ADMIN')")
	public void update(Campus obj)throws HibernateException,SQLException,IllegalAccessException;
	
	@Override @PreAuthorize("hasRole('ROLE_ADMIN')")
	public void delete(Campus campus)throws HibernateException,SQLException,IllegalAccessException;

	List<Event> getPlanning(Campus selectedCampus, Date fromDate, Date toDate);
}
